{
语法百题 解题报告：
 http://git.oschina.net/et0662/sznoi-grammar/ 
}
var
	h,s,t:double;
begin
	readln(h);
	t:=h;
	s:=h;
	while (t*0.7)>=(h/1000) do
	begin
		s:=s+0.7*2*t;
		t:=0.7*t;
	end;
	writeln(s:0:2);
end.
